package com.qidianit.mes.pojo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;
import java.util.Objects;

/**
 * @Author djl
 * @Time 2024/10/17 0:37
 */
@HeadRowHeight(50) //表头行高
@ContentRowHeight(20) //内容行高
@ColumnWidth(50) //列宽
public class ProcessSteps {
    @ExcelProperty(value = "步骤序号",index = 0)
    private int operationStepId;
    @ExcelProperty(value = "工序步骤编号",index = 1)
    private int processStepId;
    @ExcelProperty(value = "工序编号",index = 2)
    private String processId;
    @ExcelProperty(value = "步骤说明",index = 3)
    private String stepDescription;
    @ExcelProperty(value = "辅助设备",index = 4)
    private String auxiliaryEquipment;
    @ExcelProperty(value = "辅助材料",index = 5)
    private String auxiliaryMaterials;
    @ExcelProperty(value = "备注",index = 6)
    private String stepNote;
    @ExcelProperty(value = "材料URL",index = 7)
    private String materialUrl;
    @ExcelProperty(value = "修改时间",index = 8)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date modifyTime;
    public ProcessSteps() {
    }

    public ProcessSteps(int operationStepId, int processStepId, String processId, String stepDescription, String auxiliaryEquipment, String auxiliaryMaterials, String stepNote, String materialUrl,Date modifyTime) {
        this.operationStepId = operationStepId;
        this.processStepId = processStepId;
        this.processId = processId;
        this.stepDescription = stepDescription;
        this.auxiliaryEquipment = auxiliaryEquipment;
        this.auxiliaryMaterials = auxiliaryMaterials;
        this.stepNote = stepNote;
        this.materialUrl = materialUrl;
        this.modifyTime = modifyTime;
    }

    public Date getModifyTime() {
        return modifyTime;
    }

    public void setModifyTime(Date modifyTime) {
        this.modifyTime = modifyTime;
    }

    public int getOperationStepId() {
        return operationStepId;
    }

    public void setOperationStepId(int operationStepId) {
        this.operationStepId = operationStepId;
    }

    public int getProcessStepId() {
        return processStepId;
    }

    public void setProcessStepId(int processStepId) {
        this.processStepId = processStepId;
    }

    public String getProcessId() {
        return processId;
    }

    public void setProcessId(String processId) {
        this.processId = processId;
    }

    public String getStepDescription() {
        return stepDescription;
    }

    public void setStepDescription(String stepDescription) {
        this.stepDescription = stepDescription;
    }

    public String getAuxiliaryEquipment() {
        return auxiliaryEquipment;
    }

    public void setAuxiliaryEquipment(String auxiliaryEquipment) {
        this.auxiliaryEquipment = auxiliaryEquipment;
    }

    public String getAuxiliaryMaterials() {
        return auxiliaryMaterials;
    }

    public void setAuxiliaryMaterials(String auxiliaryMaterials) {
        this.auxiliaryMaterials = auxiliaryMaterials;
    }

    public String getStepNote() {
        return stepNote;
    }

    public void setStepNote(String stepNote) {
        this.stepNote = stepNote;
    }

    public String getMaterialUrl() {
        return materialUrl;
    }

    public void setMaterialUrl(String materialUrl) {
        this.materialUrl = materialUrl;
    }

    @Override
    public String toString() {
        return "ProcessSteps{" +
                "operationStepId=" + operationStepId +
                ", processStepId=" + processStepId +
                ", processId='" + processId + '\'' +
                ", stepDescription='" + stepDescription + '\'' +
                ", auxiliaryEquipment='" + auxiliaryEquipment + '\'' +
                ", auxiliaryMaterials='" + auxiliaryMaterials + '\'' +
                ", stepNote='" + stepNote + '\'' +
                ", materialUrl='" + materialUrl + '\'' +
                ", modifyTime=" + modifyTime +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ProcessSteps that = (ProcessSteps) o;
        return operationStepId == that.operationStepId && processStepId == that.processStepId && Objects.equals(processId, that.processId) && Objects.equals(stepDescription, that.stepDescription) && Objects.equals(auxiliaryEquipment, that.auxiliaryEquipment) && Objects.equals(auxiliaryMaterials, that.auxiliaryMaterials) && Objects.equals(stepNote, that.stepNote) && Objects.equals(materialUrl, that.materialUrl) && Objects.equals(modifyTime, that.modifyTime);
    }

}
